package personal.xjl._23java1studentdemo.controller;

import jdk.jfr.Category;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;


@Controller       //注解，定义一个控制器，相当于的Servlet,
                     //web.xml,<servlet><name><class></servlet>
@RequestMapping("/Student")//请求映射，定义servlet的访问形式,<servlet-mapping><url-pattern>
public class StudentController {
    //doGet,doPost
    //查
    @RequestMapping("list") //方法的请求映射
    @ResponseBody     //响应给用户的是body
    public String list(){
        System.out.println("list");   //在控制台打印字符串list
        return "<h1>23java1</h1>";              //转向到/templates/list.html页面
    }
    //增加学生
    //删除学生
    //登录

}
